import request from "@/axios";
import store from "@/store";

export class webFilterApi {
    // 列表
    static page = (params) => request.getAndLoadData("/adminapi/filte/index", params);
    // 导出
    static output = () => {
      const token = store.getters.user.token;
      window.open(`/adminapi/filte/output?token=${token}`);
    };
    // 过滤开关
    static switch = ({ id }, params) => request.getAndLoadData(`/adminapi/filte/switch/${id}`, params);
    // 删除
    static delete = ({ id }, params) => request.delAndLoadData(`/adminapi/filte/delete/${id}`, params);
    // 添加
    static add = (params) => request.postAndLoadData(`/adminapi/filte/add`, params);
    // 导入
    static import = (params) => request.upload(`/adminapi/filte/import`, params);
  }